<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['环卫管理','单桶数据汇总']" icon="fa fa-cube" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span><h2>单桶数据汇总</h2></header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn">
								<div class="s2_tableCar">
									<table-select-car [noCompany]="true" (outerCar)='getSelectCarInfo($event)'></table-select-car>
								</div>
								<div class="selectDate top_module">
									<table-select-date [notInit]="true" (outerTime)="getSelectTableTime($event)" ></table-select-date>
								</div>
								<button type="button" class="btn btn-primary" (click)="table_search()">查询</button>
								<button type="button" class="btn btn-primary" (click)="export_totle()">导出报表</button>
								<button type="button" class="btn btn-primary" (click)="census(censusModal)">统计</button>
								<!--<button type="button" class="btn btn-primary" (click)="export_datail()">明细报表</button>-->
							</div>
							<div class="right top-search">
								<input type="text" [(ngModel)]="tableQueryitem.searchKey" (change)="table_search()" class="search-input" placeholder="车牌号码...">
								<span class="top-search-box">
							        <button class="top-search-btn" type="button" (click)="table_search()"> <i class="fa fa-search"></i></button>
							    </span>
							</div>
						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th *ngFor="let item of tableHeardlist">{{item.value}}</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData" >
										<td *ngFor="let item of tableHeardlist">{{row[item.keys]}}</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount"
						           [rows]="pageSize"
						           [currentPage]="curPage - 1"
						           (onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>
	<!--  统计-->
	<div bsModal #censusModal="bs-modal" id="lgModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-lg" style="width: 800px;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" (click)="lgModalhide(censusModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title">数据统计</h4>
				</div>
				<div class="modal-body">
					<div class="row">
						<form class="form form-inline " role="form">
							<div class="row" >
								<div class="form-group clearfix">
									<div class="col-sm-5 cont">
										<label class="control-label col-sm-4 no-padding-right">车牌号码:</label>
										<span class="col-sm-8 no-padding-right">{{tableQueryitem.carNumber}}</span>
									</div>
									<div class="col-sm-7 cont">
										<label class="control-label col-sm-4 no-padding-right">时间区间:</label>
										<span class="col-sm-8 no-padding-right">{{tableQueryitem.startTime}}--{{tableQueryitem.endTime}}</span>
									</div>
								</div>
								<div class="form-group clearfix">
									<div class="col-sm-5 cont">
										<label class="control-label col-sm-4 no-padding-right">总重量:</label>
										<span class="col-sm-8 no-padding-right">{{censusData.totalWeight}}</span>
									</div>
									<div class="col-sm-7 cont">
										<label class="control-label col-sm-4 no-padding-right">总条数:</label>
										<span class="col-sm-8 no-padding-right">{{censusData.num}}</span>
									</div>
								</div>
								<div class="form-group clearfix">
									<div class="col-sm-5 cont">
										<label class="control-label col-sm-4 no-padding-right">最大值:</label>
										<span class="col-sm-8 no-padding-right">{{censusData.maxWeight}}</span>
									</div>
									<div class="col-sm-7 cont">
										<label class="control-label col-sm-4 no-padding-right">最小值:</label>
										<span class="col-sm-8 no-padding-right">{{censusData.minWeight}}</span>
									</div>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!--弹窗end-->
</div>
<style>
	.form-group{
		display: block;
		/* border: 1px solid #ccc; */
		height: 40px;
		line-height: 40px;
		margin-bottom: 5px;
	}
	.form-group .cont{
		border: 1px solid #ccc;
		text-align: left;
	}
	.form-group .cont:first-child{
		border-right: 0px;
	}
	.form-group .cont label{
		text-align: center;
	}
</style>
